﻿using System;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Label : HtmlElement, WithFor, WithForm
	{
		public Label() : base(LabelDescription.Instance) { }

		public string For { get { return this["for"]; } set { this["for"] = value; } }
		public string Form { get { return this["form"]; } set { this["form"] = value; } }
	}
	public class LabelDescription : HtmlElementDescription
	{
		public static readonly LabelDescription Instance = new LabelDescription();
		private LabelDescription() : base("label", HtmlVersion.Html4, false, true) { }
		public override string Description { get { return "caption for a form control."; } }
		public override Type ControlType { get { return typeof(Label); } }
		public override bool IsPhrasingElement { get { return true; } }
		public override bool OnlyPhrasingContent { get { return true; } }
	}
}
